//导入
import {produce} from "immer"
//原始的数据
const baseState = [
  {
      title: "Learn TypeScript",
      done: true
  },
  {
      title: "Try Immer",
      done: false
  }
];
//调用 produce 函数
const nextState = produce(baseState, draft => {
  //修改数据
  draft[0].title = '中午不吃冒菜了~~';
});

console.log(nextState);
console.log(nextState === baseState);

